package com.gdust.lease.common.utils;

import java.util.Random;

/**
 * ClassName: VerifyCodeUtil
 * Package: com.gdust.lease.common.utils
 * Description:生成验证码通用类
 *
 * @Author syun
 * @Create 2025/2/10 10:18
 * @Version 1.0
 */
public class VerifyCodeUtil {
    public static String getVerifyCode(int length) {
        StringBuilder builder = new StringBuilder();
        Random random = new Random();
        for (int i = 0; i < length; i++) {
            builder.append(random.nextInt(10));
        }
        return builder.toString();
    }
}
